package com.taoding.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * WebSocket服务配置类
 * @author wuwentan
 * @date 2018/7/17
 */
@Configuration
public class WebSocketConfig {

    /**
     * 本地使用SpringApplication运行放开此段代码
     * 打war包部署到tomcat需注释掉此段代码
     * 打jar包部署时需跳过打包test模块
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

}
